﻿using DeviceMaintainGIS.Entity;
using IRepository.Core;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DeviceMaintainGIS.Service
{
    public abstract class BaseBLL
    {
        protected readonly DbContext db = new CYOADBEntities();
        /// <summary>
        /// 数据库上下文
        /// </summary>
        protected DbContext Context { get; private set; }
        /// <summary>
        /// 工作单元上下文,与ORM构架无关
        /// </summary>
        protected IUnitOfWork UnitOfWork { get; private set; }



        public BaseBLL()
        {
            this.Context = new CYOADBEntities();
            UnitOfWork = (IUnitOfWork)this.Context;
        }
    }
}
